class DisruptorAltFire extends DisruptorFire;

var int FlameInterrupt;


event ModeDoFire()
{
//    Recoil();
    Super.ModeDoFire();
}

function Projectile SpawnProjectile(Vector Start, Rotator Dir)
{
    local DisruptorSmallProjectile Proj;
    local DisruptorFlameBig FlameEmitter;

    FlameInterrupt += 1;

    if ( ((FlameEmitter == None) || (FlameEmitter.bDeleteMe)) && FlameInterrupt == 1)
	{
	    FlameEmitter = Spawn(class'DisruptorFlameBig');
		Weapon.AttachToBone(FlameEmitter, 'tip');

	    if (FlameEmitter != None && FlameEmitter.Base != Weapon)
	        FlameEmitter.SetBase( Weapon );
	}

    if (FlameEmitter != None)
	    FlameEmitter.Trigger(Weapon, Instigator);


    if ((!Level.bDropDetail && FlameInterrupt == 2) || FlameInterrupt == 3) FlameInterrupt = 0;

    Start += Vector(Dir) * 10.0;
    Proj = Spawn(class'DisruptorSmallProjectile',,, Start, Dir);

    return Proj;
}


function DrawMuzzleFlash(Canvas Canvas)
{
    if (FlashEmitter != None)
    {
        FlashEmitter.SetRotation(Weapon(Owner).Rotation);
        Super.DrawMuzzleFlash(Canvas);
    }
}

function FlashMuzzleFlash()
{
    Super.FlashMuzzleFlash();
}

function PlayFireEnd()
{
    FlameInterrupt=0;

    if (Weapon.HasAnim(FireEndAnim))
    {
        Weapon.PlayAnim(FireEndAnim, FireEndAnimRate, TweenTime);
    }
}

function Recoil()
{
}

defaultproperties
{
     PreFireAnim="HOLD"
     FireAnim="HOLD"
     FireLoopAnim="HOLD"
     FireEndAnim="HOLD"
     FireSound=None
     FireRate=0.050000
     AmmoPerFire=2
     ShakeRotTime=0.000000
     ShakeOffsetMag=(X=0.000000)
     ShakeOffsetRate=(X=0.000000)
     ShakeOffsetTime=0.000000
     ProjectileClass=Class'Taskforces.DisruptorSmallProjectile'
     BotRefireRate=0.990000
     Spread=800.000000
     SpreadStyle=SS_Random
}
